package com.superman.supermarket.client.view.refundlist;

import java.util.List;
import java.util.Map;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Widget;
import com.superman.mvpframe.client.mvp.IPageViewPresenter;
import com.superman.mvpframe.client.widget.pulltorefresh.IPullToRefreshView;
import com.superman.mvpframe.client.widget.pulltorefresh.PullToRefreshViewAbstractImpl;
import com.superman.supermarket.client.composite.refundlist.RefundModule;

/**
 * 退款订单列表ui接口实现类
 * 
 * @author superman
 * @version 2018年8月18日下午7:16:33
 */
public class RefundListViewImpl extends PullToRefreshViewAbstractImpl implements RefundListView {

	interface RefundListViewImplUiBinder extends UiBinder<Widget, RefundListViewImpl> {
	}

	private static RefundListViewImplUiBinder uiBinder = GWT.create(RefundListViewImplUiBinder.class);

	@UiField
	FlowPanel wrapperpanel, refundlistpanel;

	/**
	 * 构造方法
	 * 
	 * @author superman
	 * @version 2018年8月18日 下午7:16:35
	 */
	public RefundListViewImpl() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	@Override
	public IPullToRefreshView getPullToRefreshView() {
		return this;
	}

	@Override
	public void init() {
		// TODO Auto-generated method stub

	}

	@Override
	public void setDataListDivId(String id) {
		refundlistpanel.getElement().setId(id);
	}

	@Override
	public void setListData(List<Map<String, Object>> list) {
		for (Map<String, Object> map : list) {
			RefundModule refundModule = new RefundModule();
			refundModule.setData(map);
			this.refundlistpanel.add(refundModule);
		}
	}

	@Override
	public void setMeScrollDivId(String id) {
		wrapperpanel.getElement().setId(id);
	}

	@Override
	public void setPageViewPresenter(IPageViewPresenter presenter) {
		// TODO Auto-generated method stub

	}

}
